package OSI.OSU.PSU.OSU.MSQ.VQ.SQ.aviToLyg;
import java.awt.event.ActionEvent;

import java.awt.event.ActionListener;
import javax.swing.JButton;

import OPE.OEQ.MCQ.OVU.PQE.osgi.OSU_AOU_AOQ_VES;
import S_A.SVQ.stable.S_ShellETL;

import java.awt.FileDialog;


import java.awt.Frame;
import java.awt.Panel;
import java.awt.ScrollPane;
import java.awt.Color;
public class AVItoLYGOSU_MSQ_AOI_AOD_AOU_AOQ_VES extends OSU_AOU_AOQ_VES {
	
	private FileDialog filedialog;
	public AVItoLYGOSU_MSQ_AOI_AOD_AOU_AOQ_VES(final AVItoLYGOSU_MSQ_OPE_OPC_ECI _SQ__OPE_OPC_ECI){
		setLayout(null);
		scrollPane= new ScrollPane();
		add(scrollPane);
		panel=new Panel();
		panel.setLayout(null);
		panel.setBackground(Color.white);
		JButton button= new JButton("Finish");
		button.setBounds(0, 0, 200, 30);
		button.addActionListener(new ActionListener(){
            public void actionPerformed(ActionEvent e) {
            	S_logger.Log.logger.info("" + e.getSource());
                	close=true;
                	_SQ__OPE_OPC_ECI.value=1;
            }
        });   
		panel.add(button);
		JButton readfile= new JButton("Read AVI");
		readfile.setBounds(0, 35, 200, 40);
		readfile.addActionListener(new ActionListener(){
			@Override
			public void actionPerformed(ActionEvent arg0) {
				 filedialog=new FileDialog(new Frame(), "readfilechoose", FileDialog.LOAD);
				 filedialog.setVisible(true);
				 _SQ__OPE_OPC_ECI.filepath=filedialog.getDirectory()+filedialog.getFile();
			     S_logger.Log.logger.info("" + _SQ__OPE_OPC_ECI.filepath);

				}
			});
		panel.add(readfile);
		
		
		JButton readfile1= new JButton("Read AVI'S WAV");
		readfile1.setBounds(0, 80, 200, 50);
		readfile1.addActionListener(new ActionListener(){
			@Override
			public void actionPerformed(ActionEvent arg0) {
				 filedialog=new FileDialog(new Frame(), "readfilechoose", FileDialog.LOAD);
				 filedialog.setVisible(true);
				 _SQ__OPE_OPC_ECI.filepathWAV=filedialog.getDirectory()+filedialog.getFile();
			     S_logger.Log.logger.info("" + _SQ__OPE_OPC_ECI.filepath);

				}
			});
		panel.add(readfile1);
		JButton writefile= new JButton("WRITE LYG");
		writefile.setBounds(0, 135, 200, 60 );
		writefile.addActionListener(new ActionListener(){
			@Override
			public void actionPerformed(ActionEvent arg0) {
				 filedialog= new FileDialog(new Frame(), "writefilechoose", FileDialog.LOAD);
				 filedialog.setVisible(true);
				 _SQ__OPE_OPC_ECI.writefile= filedialog.getDirectory()+ filedialog.getFile();
			     S_logger.Log.logger.info("" + _SQ__OPE_OPC_ECI.writefile);

				}
			});
		panel.add(writefile);	
		scrollPane.add(panel);
		close= false;
 	}
	public void config()
	{    
		S_logger.Log.logger.info("" + S_ShellETL.SHELL_ETL_DID_CONFIG);       
	}
}
